<?php
$this->breadcrumbs = array(
    'Admin' => array('index'),
    ' - ' . $model->admin_nicename,
);
?>

<div class="box">
    <header>
        <div class="icons"><i class="icon-user"></i></div>
        <h5><?php echo $model->admin_nicename ?></h5>
    </header>
    <div class="body">
        <div class="row-fluid">
            <div class="span6">
                <?php
                $this->widget('bootstrap.widgets.TbDetailView', array(
                    'data' => $model,
                    'attributes' => array(
                        'admin_id',
                        array(
                            'name' => 'firstname',
                            'value' => $model->profile->firstname
                        ),
                        array(
                            'name' => 'lastname',
                            'value' => $model->profile->lastname
                        ),
                        'admin_nicename',
                        'admin_login',
                        'admin_email',
                        array(
                            'name' => 'admin_role',
                            'value' => $model->getRolesText()
                        ),
                        array(
                            'name' => 'admin_status',
                            'value' => $model->getStatusText()
                        ),
                        array(
                            'name' => 'admin_registered',
                            'type' => 'date'
                        ),
//                array(
//                    'name' => 'gender',
//                    'value' => $model->profile->gender
//                ),
                        array(
                            'name' => 'birthday',
                            'value' => $model->profile->birthdate,
                            'type' => 'date'
                        ),
                        array(
                            'name' => 'phone',
                            'value' => $model->profile->phone
                        ),
                        array(
                            'name' => 'address',
                            'value' => $model->profile->address
                        ),
//                array(
//                    'name' => 'last_login_time',
//                    'type' => 'date'
//                ),
                        array(
                            'name' => 'admin_avatar',
                            'type' => 'raw',
                            'value' => CHtml::image($model->getAvatarUrl('thumb'))
                        )
                    ),
                ));
                ?>
            </div>
            <?php if ($order): ?>
                <div class="span4">
                    <div>Total Orders Completed Today: <?php echo $order['today']; ?></div>
                    <div>Total Orders Completed Week: <?php echo $order['week']; ?></div>
                    <div>Total Orders Completed Month: <?php echo $order['month']; ?></div>
                    <div>Total Orders Completed: <?php echo $order['total']; ?></div>
                </div>
            <?php endif; ?>
        </div>
    </div>
</div>
